#!/bin/bash -x

AVRDUDE=avrdude
HEXROMTRG=$1.hex 
PROGRAMMER_MCU=m8
AVRDUDE_PROGRAMMERID=stk500v2
AVRDUDE_PORT=/dev/ttyACM0 #avrdoper #/dev/ttyACM0 # avrdoper

$AVRDUDE -c $AVRDUDE_PROGRAMMERID   \
    -p $PROGRAMMER_MCU -P $AVRDUDE_PORT -e        \
	-U flash:w:$HEXROMTRG
